//getScreenCapture()//获取截图权
var jt = images.captureScreen()
images.save(jt, "/sdcard/" + random(0, 10000000) + ".jpg", "jpg", 100);
function getScreenCapture() {
    let Thread = threads.start(function () {
        if (auto.service != null) {
            let Allow = textMatches(/(允许|立即开始|统一)/).findOne(10 * 1000);
            if (Allow) {
                Allow.click();
            }
        }
    });
    if (!requestScreenCapture()) {
        log("请求截图权限失败");
        return false;
    } else {
        Thread.interrupt()
        log("已获得截图权限");
        return true;
    }
}